#ifndef FIR_MATRIXAI_EVALUATOR_H_
#define FIR_MATRIXAI_EVALUATOR_H_

#include "common.h"

typedef unsigned char Byte;

class Evalutor {
public:
    Evalutor();
    virtual ~Evalutor();
    virtual long Evaluate(Byte matrix[15][15], ChessType side);
    

protected:
    
    void AnalysisLine(Byte* line, int length, int dir, int lnum);

    // type count per line of four direction of each color
    // 1st 2 represent 2 direction: horizon and vertical
    // 15 represent 15 line of each direction
    // 2nd 2 represent 2 color
    // 7 represent 7 chess type: sleeping two, alive two, sleeping three,
    // alive three, rushing four, alive four, five
    long straight_type_count[2][15][2][7];

    long oblique_type_count[2][29][2][7];

    static const int position_value[15][15];

};

#endif // FIR_MATRIXAI_EVALUATOR_H_